package StringTest;

public class Test {
    public static void main(String[] args) {
        StringBuilder s1 = new StringBuilder();
        //StringBuilder链式方法
        s1.append("hello").append("world");
        //反向
        s1.reverse();
        //返回字符串长度
        System.out.println(s1.length());
        //转换成String数据类型
        String s= s1.toString();
        System.out.println(s);
        //StringBuilder效率
        for (int i = 0; i < 1; i++) {
            s1.append("abc");
        }
        System.out.println(s1);
    }
}
